package com.tsd.system.dao;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysAccountSet;
import com.tsd.system.entity.SysAccountSetExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysAccountSetMapper
 *
 * @author huawei
 * @date 2021/09/02 21:46:17
 */
public interface SysAccountSetMapper {

    SysAccountSet selectByPrimaryKey(Long id);

    SysAccountSetExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(SysAccountSet record);

    int insertSelective(SysAccountSet record);

    int insertList(List<SysAccountSet> list);

    int updateByPrimaryKey(SysAccountSet record);

    int updateByPrimaryKeySelective(SysAccountSet record);

    List<SysAccountSetExt> selectByEntity(SysAccountSetExt record);

    List<SysAccountSetExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<SysAccountSetExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<SysAccountSetExt> selectByParams(@Param("params") Map<String, Object> params);

    SysAccountSetExt selectByCode(@Param("code") String code);

    SysAccountSetExt selectDumpObj(SysAccountSet record);

    void updateAttributeBySid(SysAccountSetExt t);

    SysAccountSetExt selectCreating();
    //需要建库的账套
    SysAccountSetExt select4Create();

    int updateExpired(SysAccountSetExt t);

    void initAccountSetAdmin(@Param("login_id") String loginId, @Param("password") String password);

    /**
     * 过期账套改为免费版
     */
    void update2Free4Expired();
}
